package com.wanxi.worker;

public class Manger extends Worker {
    private int bonus;

    public Manger() {
    }

    public int getBonus() {
        return bonus;
    }

    public void setBonus(int bonus) {
        this.bonus = bonus;
    }

    public Manger(int workerNumber, String name, int salary, int bonus) {
        super(workerNumber, name, salary);
        this.bonus = bonus;
    }

    @Override
    public void work() {
        System.out.println("管理别人");
    }

    @Override
    public String toString() {
        return "Worker{WorkerNumber=" + getWorkerNumber() + ",name= '" + getName() + '\'' + " , salary=" + getSalary() + " , bonus=" + getBonus() + "}";

    }
}
